#pragma once
#include "Trapeze.h"

const int DEFAULT_HASHTABLE_SIZE = 63;

class HashNode
{
friend class HashTable;
private:
	int key;
	Trapeze figure;
	HashNode* nextPtr;
public:
	HashNode(int, Trapeze&);
	int getKey();
	Trapeze& getFigure();
};

class HashTable 
{
private:
	HashNode **table;
	int HashFunction (Trapeze&);
	bool Compare (Trapeze&, Trapeze&);
public:
	HashTable();
	~HashTable();
	void Add (Trapeze&);
	bool Remove (int);
	bool Remove (Trapeze&);
	int Search (Trapeze&);
};

